# -*- encoding: utf-8 -*-
"""
@File : two_sum.py
@Time : 2021/4/5 21:27
@Author : Linleil
"""


def two_sum(nums, target):
    """
    nums:List
    target:int
    return:List
    """
    list_num = []
    for i in range(0, len(nums)):
        for j in range(i+1, len(nums)):
            if nums[i] + nums[j] == target:
                l1 = []
                l1.append(i)
                l1.append(j)
                list_num.append(l1)
    return list_num


l = two_sum([1, 5, 6, 7, 3], 8)
print(l)
